package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Test1 {
    //写入文件
    /*
    public static void main(String[] args) throws IOException {
        FileOutputStream fos=new FileOutputStream("abc.txt",true);
        for (char a='a';a<='z';a++){
            fos.write(a);
        }
        System.out.println("输出完毕");
        fos.close();
     */
    public static void main(String[] args) throws IOException {
        FileInputStream fis=new FileInputStream("abc.txt");
        int d;
        while ((d=fis.read())!=-1){
            System.out.print((char)d);
        }
        fis.close();
    }
}
